package com.thermal.thermal_inspection.mapper;

import com.thermal.thermal_inspection.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

@Repository
@Mapper
public interface UserMapper {
    /**
     * 查找用户是否存在
     */
    User existUser(String username, String password);

    /**
     * 通过username查找user
     */
    User getUserByUsername(String username);

    /**
     * 注册新用户
     */
    int register(User user);

    /**
     * 通过userId获取User
     */
    User getUserByUserId(int userId);

    /**
     * 修改信息
     */
    int fix(User user);
}
